/* 全局样式设置 */
body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	/* 设置背景图片和渐变遮罩 */
	background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
				url('https://images.unsplash.com/photo-1550745165-9bc0b252726f?q=80&w=1920&auto=format&fit=crop') center/cover fixed no-repeat;
	font-family: 'Segoe UI', Arial, sans-serif;
	/* 背景动画效果 */
	animation: backgroundShift 30s ease infinite;
	background-size: 200% 200%;
}

/* 背景缓慢移动动画 */
@keyframes backgroundShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

#mine {
	margin: 50px auto;
	max-width: 800px;
	font-family: Arial, sans-serif;
}

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding: 10px;
	background: #f5f5f5;
	border-radius: 5px;
}

.level {
	display: flex;
	gap: 10px;
}

.level button {
	padding: 8px 16px;
	background: #02a4ad;
	border: none;
	color: #fff;
	border-radius: 3px;
	outline: none;
	cursor: pointer;
	transition: background-color 0.3s;
}

.level button:hover {
	background: #018c94;
}

.level button.active {
	background: #00abff;
}

.stats {
	display: flex;
	gap: 20px;
	font-size: 18px;
	font-weight: bold;
}

.timer, .mineNum {
	padding: 5px 10px;
	background: #333;
	color: #fff;
	border-radius: 3px;
	min-width: 60px;
	text-align: center;
}

.gameBox {
	margin: 0 auto;
	background: #f5f5f5;
	padding: 10px;
	border-radius: 5px;
}

table {
	border-spacing: 1px;
	background: #929196;
	margin: 0 auto;
	border-radius: 3px;
	overflow: hidden;
}

td {
	padding: 0;
	width: 30px;
	height: 30px;
	background: #ccc;
	border: 2px solid;
	border-color: #fff #a1a1a1 #a1a1a1 #fff;
	text-align: center;
	line-height: 30px;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.2s;
}

td:hover {
	background: #ddd;
}

.info {
	margin-top: 20px;
	text-align: center;
}

.tips {
	display: none;
	margin: 10px 0;
	font-size: 24px;
	font-weight: bold;
	color: #f00;
}

.stats-panel {
	margin-top: 20px;
	padding: 15px;
	background: #f5f5f5;
	border-radius: 5px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	display: none; /* 默认隐藏 */
}

.stats-panel h3 {
	margin: 0 0 15px 0;
	color: #333;
	text-align: center;
	font-size: 1.2em;
}

.stats-content {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 15px;
	max-height: 300px;
	overflow-y: auto;
	padding: 10px;
}

.stat-item {
	background: white;
	padding: 10px;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: transform 0.2s;
}

.stat-item:hover {
	transform: translateY(-2px);
}

.stat-item.win {
	border-left: 4px solid #019f02;
}

.stat-item.lose {
	border-left: 4px solid #ff2600;
}

.stat-item div {
	margin: 5px 0;
	color: #333;
	font-size: 0.9em;
}

.stat-item div:first-child {
	color: #02a4ad;
	font-weight: bold;
}

.no-stats {
	text-align: center;
	color: #666;
	padding: 20px;
	grid-column: 1 / -1;
}

/* 自定义滚动条样式 */
.stats-content::-webkit-scrollbar {
	width: 8px;
}

.stats-content::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.stats-content::-webkit-scrollbar-thumb {
	background: #02a4ad;
	border-radius: 4px;
}

.stats-content::-webkit-scrollbar-thumb:hover {
	background: #018c94;
}

.mine {
	background: #d9d9d9 url(../images/mine.jpg) no-repeat center;
	background-size: cover;
}

.redMine {
	background: #d9d9d9 url(../images/redMine.png) no-repeat center;
	background-size: cover;
}

.flag {
	background: #ccc url(../images/flag.jpeg) no-repeat center;
	background-size: cover;
}

.revealed {
	border-color: #d9d9d9;
	background: #d9d9d9;
}

.number-1 { color: #0332fe; }
.number-2 { color: #019f02; }
.number-3 { color: #ff2600; }
.number-4 { color: #93208f; }
.number-5 { color: #ff7f29; }
.number-6 { color: #ff3fff; }
.number-7 { color: #3fffbf; }
.number-8 { color: #22ee0f; }

@media (max-width: 600px) {
	.header {
		flex-direction: column;
		gap: 10px;
	}
	
	.level {
		flex-wrap: wrap;
		justify-content: center;
	}
	
	td {
		width: 25px;
		height: 25px;
		line-height: 25px;
	}
}

/* 开始游戏界面样式 */
.start-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/* 背景设置 */
	background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
				url('https://images.unsplash.com/photo-1550745165-9bc0b252726f?q=80&w=1920&auto=format&fit=crop') center/cover no-repeat;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	color: white;
	font-family: Arial, sans-serif;
}

/* 游戏标题样式 */
.start-screen h1 {
	font-size: 4em;
	margin-bottom: 40px;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
	/* 标题渐变效果 */
	background: linear-gradient(45deg, #00ff9d, #00b8ff);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: titleGlow 2s ease-in-out infinite alternate;
}

/* 标题发光动画 */
@keyframes titleGlow {
	from {
		text-shadow: 0 0 10px rgba(0, 255, 157, 0.5),
					0 0 20px rgba(0, 255, 157, 0.3),
					0 0 30px rgba(0, 255, 157, 0.2);
	}
	to {
		text-shadow: 0 0 20px rgba(0, 184, 255, 0.8),
					0 0 30px rgba(0, 184, 255, 0.5),
					0 0 40px rgba(0, 184, 255, 0.3);
	}
}

/* 欢迎文字容器 */
.welcome-text {
	text-align: center;
	margin-bottom: 30px;
	opacity: 0;
	animation: fadeIn 1s ease-out forwards;
}

/* 欢迎语第一行 */
.welcome-line {
	font-size: 2em;
	margin-bottom: 10px;
	color: #00ff9d;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
	opacity: 0;
	animation: fadeInUp 0.8s ease-out forwards;
	animation-delay: 0.5s;
}

/* 欢迎语第二行 */
.challenge-line {
	font-size: 1.5em;
	color: #00b8ff;
	text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
	opacity: 0;
	animation: fadeInUp 0.8s ease-out forwards;
	animation-delay: 1s;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 难度选择区域 */
.difficulty-selection {
	text-align: center;
	margin-bottom: 30px;
	background: rgba(0, 0, 0, 0.6);
	padding: 20px;
	border-radius: 10px;
	backdrop-filter: blur(5px);
}

/* 难度选择标题 */
.difficulty-selection h2 {
	font-size: 1.8em;
	margin-bottom: 20px;
	color: #fff;
	text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
	background: linear-gradient(45deg, #00ff9d, #00b8ff);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* 难度按钮容器 */
.difficulty-buttons {
	display: flex;
	gap: 15px;
}

/* 难度选择按钮 */
.difficulty-buttons button {
	padding: 12px 25px;
	font-size: 1.1em;
	background: rgba(0, 255, 157, 0.1);
	border: 2px solid rgba(0, 255, 157, 0.8);
	color: #00ff9d;
	border-radius: 5px;
	cursor: pointer;
	transition: all 0.3s;
	backdrop-filter: blur(5px);
}

/* 难度按钮悬停效果 */
.difficulty-buttons button:hover {
	background: rgba(0, 255, 157, 0.2);
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0, 255, 157, 0.3);
}

/* 当前选中的难度按钮 */
.difficulty-buttons button.active {
	background: rgba(0, 255, 157, 0.9);
	color: #000;
	border-color: #00b8ff;
}

/* 开始游戏按钮 */
.start-button {
	padding: 15px 40px;
	font-size: 1.3em;
	background: linear-gradient(45deg, #00ff9d, #00b8ff);
	color: #000;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	transition: all 0.3s;
	box-shadow: 0 4px 15px rgba(0, 255, 157, 0.3);
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: bold;
}

/* 开始按钮悬停效果 */
.start-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 184, 255, 0.4);
	background: linear-gradient(45deg, #00b8ff, #00ff9d);
}

/* 开始按钮点击效果 */
.start-button:active {
	transform: translateY(1px);
	box-shadow: 0 2px 10px rgba(0, 255, 157, 0.2);
}

/* 游戏主容器 */
.game-container {
	margin: 20px auto;
	max-width: 1000px;
	font-family: 'Segoe UI', Arial, sans-serif;
	background: rgba(26, 26, 26, 0.95);
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.5);
	overflow: hidden;
	color: #fff;
	backdrop-filter: blur(10px);
	border: 1px solid rgba(147, 112, 219, 0.2);
}

/* 游戏头部区域 */
.game-header {
	background: linear-gradient(135deg, rgba(147, 112, 219, 0.9), rgba(138, 43, 226, 0.9));
	padding: 25px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: relative;
	overflow: hidden;
}

/* 游戏标题区域 */
.game-title {
	text-align: center;
	position: relative;
	z-index: 1;
}

/* 游戏标题文字 */
.game-title h2 {
	font-size: 2.5em;
	margin: 0;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
	background: linear-gradient(45deg, #fff, #f0f0f0);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	font-weight: 800;
}

/* 游戏副标题 */
.game-subtitle {
	font-size: 1.1em;
	opacity: 0.9;
	letter-spacing: 3px;
	text-transform: uppercase;
	margin-top: 5px;
	color: #fff;
	text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* 游戏控制区域 */
.game-controls {
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: relative;
	z-index: 1;
}

/* 难度选择按钮组 */
.level {
	display: flex;
	gap: 12px;
}

/* 难度按钮样式 */
.level button {
	padding: 10px 20px;
	background: rgba(0,0,0,0.2);
	border: 2px solid rgba(255,255,255,0.3);
	color: white;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* 难度按钮悬停效果 */
.level button:hover {
	background: rgba(255,255,255,0.1);
	transform: translateY(-2px);
	border-color: rgba(255,255,255,0.5);
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 当前选中的难度按钮 */
.level button.active {
	background: rgba(255,255,255,0.9);
	color: #9370db;
	border-color: #8a2be2;
	box-shadow: 0 0 15px rgba(147, 112, 219, 0.5);
}

/* 重新开始按钮 */
.restart-btn {
	background: rgba(147, 112, 219, 0.2) !important;
	border: 2px solid #9370db !important;
	color: #9370db !important;
}

/* 重新开始按钮悬停效果 */
.restart-btn:hover {
	background: rgba(147, 112, 219, 0.3) !important;
	box-shadow: 0 0 20px rgba(147, 112, 219, 0.4) !important;
}

/* 游戏统计区域 */
.stats {
	display: flex;
	gap: 25px;
}

/* 统计项样式 */
.stat-item {
	background: rgba(0,0,0,0.3);
	padding: 12px 20px;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 100px;
	border: 1px solid rgba(255,255,255,0.1);
	backdrop-filter: blur(5px);
}

/* 统计标签 */
.stat-label {
	font-size: 0.9em;
	opacity: 0.8;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* 计时器和地雷数显示 */
.timer, .mineNum {
	font-size: 1.4em;
	font-weight: bold;
	color: #9370db;
	text-shadow: 0 0 10px rgba(147, 112, 219, 0.3);
}

/* 游戏内容区域 */
.game-content {
	padding: 30px;
	background: rgba(45, 45, 45, 0.95);
	position: relative;
}

/* 游戏盒子 */
.gameBox {
	margin: 0 auto;
	background: rgba(0, 0, 0, 0.4);
	padding: 15px;
	border-radius: 10px;
	box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
	border: 1px solid rgba(147, 112, 219, 0.2);
	position: relative;
	z-index: 1;
}

/* 游戏表格 */
table {
	border-spacing: 2px;
	background: rgba(0,0,0,0.3);
	margin: 0 auto;
	border-radius: 5px;
	overflow: hidden;
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 表格单元格 */
td {
	padding: 0;
	width: 35px;
	height: 35px;
	background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
	border: 2px solid;
	border-color: #4a4a4a #1a1a1a #1a1a1a #4a4a4a;
	text-align: center;
	line-height: 35px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.2s;
	position: relative;
	overflow: hidden;
}

/* 单元格悬停效果 */
td:hover {
	background: linear-gradient(135deg, #4a4a4a, #3a3a3a);
	transform: scale(1.05);
	z-index: 1;
}

/* 单元格装饰效果 */
td::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%);
	opacity: 0;
	transition: opacity 0.2s;
}

/* 单元格悬停时的装饰效果 */
td:hover::after {
	opacity: 1;
}

/* 游戏信息区域 */
.game-info {
	margin-top: 30px;
}

/* 游戏提示 */
.tips {
	display: none;
	text-align: center;
	margin: 15px 0;
	font-size: 28px;
	font-weight: bold;
	color: #ff4444;
	text-shadow: 0 0 10px rgba(255,68,68,0.5);
	animation: shake 0.5s ease-in-out;
}

/* 统计面板 */
.stats-panel {
	margin-top: 25px;
	padding: 20px;
	background: rgba(0, 0, 0, 0.4);
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(0,0,0,0.3);
	border: 1px solid rgba(147, 112, 219, 0.1);
	position: relative;
	z-index: 1;
}

/* 统计面板标题 */
.stats-panel h3 {
	color: #9370db;
	margin-bottom: 20px;
	text-align: center;
	font-size: 1.4em;
	text-transform: uppercase;
	letter-spacing: 2px;
}

/* 游戏底部区域 */
.game-footer {
	background: rgba(26, 26, 26, 0.95);
	padding: 25px;
	border-top: 1px solid rgba(147, 112, 219, 0.1);
	position: relative;
}

/* 游戏规则区域 */
.game-rules {
	max-width: 800px;
	margin: 0 auto;
}

/* 规则标题 */
.game-rules h3 {
	color: #9370db;
	margin-bottom: 20px;
	text-align: center;
	font-size: 1.4em;
	text-transform: uppercase;
	letter-spacing: 2px;
}

/* 规则列表 */
.game-rules ul {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 15px;
}

/* 规则列表项 */
.game-rules li {
	background: rgba(0, 0, 0, 0.4);
	padding: 15px 20px;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px solid rgba(147, 112, 219, 0.1);
	transition: all 0.3s;
	backdrop-filter: blur(5px);
}

/* 规则列表项悬停效果 */
.game-rules li:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.3);
	background: rgba(0, 0, 0, 0.5);
	border-color: rgba(147, 112, 219, 0.2);
}

/* 规则列表项装饰点 */
.game-rules li::before {
	content: "•";
	color: #9370db;
	font-size: 1.8em;
	text-shadow: 0 0 10px rgba(147, 112, 219, 0.5);
}

/* 数字颜色样式 */
.number-1 { color: #4a9eff; }
.number-2 { color: #4caf50; }
.number-3 { color: #f44336; }
.number-4 { color: #9c27b0; }
.number-5 { color: #ff9800; }
.number-6 { color: #00bcd4; }
.number-7 { color: #795548; }
.number-8 { color: #607d8b; }

/* 响应式设计 */
@media (max-width: 768px) {
	body {
		background-attachment: scroll;
	}
	
	.game-container {
		margin: 10px;
		border-radius: 10px;
	}
	
	.game-header {
		flex-direction: column;
		gap: 20px;
		text-align: center;
	}
	
	.game-controls {
		width: 100%;
	}
	
	.level {
		flex-wrap: wrap;
		justify-content: center;
	}
	
	.stats {
		justify-content: center;
	}
	
	td {
		width: 30px;
		height: 30px;
		line-height: 30px;
	}
	
	.game-rules ul {
		grid-template-columns: 1fr;
	}
}
